let bsModal;
$(document).ready(function () {
    bsModal = new bootstrap.Modal($('#modal')[0]);
});

function showModal(title, time) {
    $('#modal-title').text(title);
    $('#modal-body').text(`时间：${time}`);
    bsModal.show();
}

function deleteItem(btn) {
    if (confirm('确定要删除这条记录吗？')) {
        $(btn).closest('.list-group-item').fadeOut(300, function() {
            $(this).remove();
        });
    }
}